<template>
  <div class="align-c">
    <div class="align-c" style="width: 700px">
      <span v-html="taskMemberContract.content"></span>
    </div>
    <div slot="footer" class="dialog-footer" style="float: left;margin-top: 100px">
      <el-button @click="$router.go(-1)">返回上一级</el-button>
    </div>
  </div>
</template>

<style scoped>

</style>

<script>
  import { getContract } from '@/api/project/taskMember'
  export default {
    data() {
      return {
        taskId: '',
        memberId: '',
        taskMemberContract: ''
      }
    },
    // 初始化页面
    created() {
      const queryParams = this.getCurrentPage().query
      if (queryParams && queryParams.taskId) {
        this.taskId = queryParams.taskId
      }
      if (queryParams && queryParams.memberId) {
        this.memberId = queryParams.memberId
      }
      this.init()
    },
    methods: {
      init() {
        getContract(this.taskId, this.memberId).then(response => {
          if (response.isError) return
          this.taskMemberContract = response.data
        })
      }
    }
  }
</script>

<style scoped>
  .span-member {
    font-size: 15px;
  }
  .span-member-1 {
    margin-left: 10px;
    margin-right: 10px;
  }
  .span-member-2 {
    margin-right: 10px;
  }
  .user-avatar{
    width: 46px;
    height: 46px;
    display: block;
    border-radius: 50px;
  }
</style>
